// @ts-ignore
/* eslint-disable */
import request from '../utils/request.ts'

/** publishAnnouncementAll POST /api/ws/announcement/publish */
export async function publishAnnouncementAllUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.publishAnnouncementAllUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<string>('/api/ws/announcement/publish', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** getAllAnnouncements GET /api/ws/api/announcement/all */
export async function getAllAnnouncementsUsingGet(options?: { [key: string]: any }) {
  return request<API.Announcement[]>('/api/ws/api/announcement/all', {
    method: 'GET',
    ...(options || {}),
  })
}

/** index GET /api/ws/index */
export async function indexUsingGet(options?: { [key: string]: any }) {
  return request<string>('/api/ws/index', {
    method: 'GET',
    ...(options || {}),
  })
}

/** page GET /api/ws/page */
export async function pageUsingGet(options?: { [key: string]: any }) {
  return request<API.ModelAndView>('/api/ws/page', {
    method: 'GET',
    ...(options || {}),
  })
}

/** pushToWeb POST /api/ws/push/${param0} */
export async function pushToWebUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.pushToWebUsingPOSTParams,
  options?: { [key: string]: any }
) {
  const { toUserId: param0, ...queryParams } = params
  return request<string>(`/api/ws/push/${param0}`, {
    method: 'POST',
    params: {
      ...queryParams,
    },
    ...(options || {}),
  })
}
